package com.miracle.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.miracle.system.base.domain.BaseEntity;
import org.springframework.data.annotation.Transient;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author ：miracle.cui
 * @description：TODO
 * @date ：2020/8/21 17:33
 */
public class SysOrg extends BaseEntity {
    /**
     * 行政组织ID
     */
    private Integer orgId;

    /**
     * 行政组织编码
     */
    private String orgCode;

    /**
     * 行政组织名称
     */
    private String orgName;

    /**
     * 行政组织全称
     */
    private String orgFullname;

    /**
     * 上级行政组织ID
     */
    private Integer parentOrgId;

    /**
     * 主管职位
     */
    private String manaPosition;

    /**
     * 行政组织地址
     */
    private String orgAddr;

    /**
     * 行政组织联系人
     */
    private Integer linkman;

    /**
     * 邮箱地址
     */
    private String email;

    /**
     * 备注
     */
    private String remark;

    /**
     * 网址
     */
    private String weburl;

    /**
     * 全路径
     */
    private String fullpath;

    /**
     * 行政组织类型
     */
    private String orgtype;

    /**
     * 行政组织小类
     */
    private String orgdetailtype;

    /**
     * 联系电话
     */
    private String linktel;

    /**
     * 是否叶子节点
     */
    private String isBranch;

    /**
     * 生效日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date validDate = new Date();

    /**
     * 失效日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date invalidDate;

    /**
     * 删除标记
     */
    private String delSign;

    /**
     * 组织的角色列表
     */
    //private List<HoopooSysOrgRole> orgRoles;

    /**
     * 组织的用户列表
     */
    //private List<HoopooSysOrgUser> orgUsers;


    @Transient
    private List<SysOrg> children = new ArrayList<SysOrg>();

    public Integer getOrgId() {
        return orgId;
    }

    public void setOrgId(Integer orgId) {
        this.orgId = orgId;
    }

    public String getOrgCode() {
        return orgCode;
    }

    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public String getOrgFullname() {
        return orgFullname;
    }

    public void setOrgFullname(String orgFullname) {
        this.orgFullname = orgFullname;
    }

    public Integer getParentOrgId() {
        return parentOrgId;
    }

    public void setParentOrgId(Integer parentOrgId) {
        this.parentOrgId = parentOrgId;
    }

    public String getManaPosition() {
        return manaPosition;
    }

    public void setManaPosition(String manaPosition) {
        this.manaPosition = manaPosition;
    }

    public String getOrgAddr() {
        return orgAddr;
    }

    public void setOrgAddr(String orgAddr) {
        this.orgAddr = orgAddr;
    }

    public Integer getLinkman() {
        return linkman;
    }

    public void setLinkman(Integer linkman) {
        this.linkman = linkman;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getWeburl() {
        return weburl;
    }

    public void setWeburl(String weburl) {
        this.weburl = weburl;
    }

    public String getFullpath() {
        return fullpath;
    }

    public void setFullpath(String fullpath) {
        this.fullpath = fullpath;
    }

    public String getOrgtype() {
        return orgtype;
    }

    public void setOrgtype(String orgtype) {
        this.orgtype = orgtype;
    }

    public String getOrgdetailtype() {
        return orgdetailtype;
    }

    public void setOrgdetailtype(String orgdetailtype) {
        this.orgdetailtype = orgdetailtype;
    }

    public String getLinktel() {
        return linktel;
    }

    public void setLinktel(String linktel) {
        this.linktel = linktel;
    }

    public String getIsBranch() {
        return isBranch;
    }

    public void setIsBranch(String isBranch) {
        this.isBranch = isBranch;
    }

    public Date getValidDate() {
        return validDate;
    }

    public void setValidDate(Date validDate) {
        this.validDate = validDate;
    }

    public Date getInvalidDate() {
        return invalidDate;
    }

    public void setInvalidDate(Date invalidDate) {
        this.invalidDate = invalidDate;
    }

    public String getDelSign() {
        return delSign;
    }

    public void setDelSign(String delSign) {
        this.delSign = delSign;
    }

    public List<SysOrg> getChildren() {
        return children;
    }

    public void setChildren(List<SysOrg> children) {
        this.children = children;
    }
}
